const { Clutter, GLib, GObject, Gio, St } = imports.gi;
+const Params = imports.misc.params;
+
var ANIMATED_ICON_UPDATE_TIMEOUT = 16;
var SPINNER_ANIMATION_TIME = 300;
var SPINNER_ANIMATION_DELAY = 1000;
var Spinner = GObject.registerClass(
class Spinner extends AnimatedIcon {
- _init(size, animate = false) {
+ _init(size, params) {
+ params = Params.parse(params, {
+ animate: false,
+ });
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
super._init(file, size);
this.opacity = 0;
- this._animate = animate;
+ this._animate = params.animate;
}
_onDestroy() {
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
this._passwordEntry.clutter_text.connect('activate', this._onPasswordActivate.bind(this));
- this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, true);
+ this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, {
+ animate: true,
+ });
if (rtl) {
layout.attach(this._workSpinner, 0, row, 1, 1);
GObject.BindingFlags.SYNC_CREATE);
this._passwordBox.add_child(this._passwordEntry);
- this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, true);
+ this._workspinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, {
+ animate: true,
+ });
this._passwordBox.add(this._workSpinner);
this._passwordBox.hide();
this._overviewHidingId = Main.overview.connect('hiding', this._sync.bind(this));
this._overviewShowingId = Main.overview.connect('showing', this._sync.bind(this));
- this._spinner = new Animation.Spinner(PANEL_ICON_SIZE, true);
+ this._spinner = new Animation.Spinner(PANEL_ICON_SIZE, {
+ animate: true,
+ });
this._container.add_actor(this._spinner);
let menu = new AppMenu(this);
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
this.setInitialKeyFocus(this._passwordEntry);
- this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, true);
+ this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, {
+ animate: true,
+ });
this._passwordEntry.secondary_icon = this._workSpinner;
if (rtl) {